
package org.douxiaoban.client.api;

import java.util.HashMap;

import android.graphics.Bitmap;
/**
 * ******************************************
 * @ClassName: MiniBlogItemData
 * @Description: 数据存储类用于存储广播的中每个item的数据
 * @author 6a209
 * @date 2011-6-4 下午01:40:41
 *
 *******************************************
 */
public class MiniBlogItemData{
	public enum ItemType{
		SAYING,
		BOOK,
		MAGAZINE,
		MOVIE,
		TV,
		MUSIC,
		PLACE,
		GROUP,
		EVENT,
		SITE,
		RECOMMENDATION,  //推荐
		NOTE,
		BLOG,
		PHOTO,
		CONTACT,
		PLAZA,
		SIGNATURE,
        UNKONW
	}
	
	public enum FavorityType{
		BOOK,
		MOVIE,
		MUSIC
	}

	public String m_sName;
	//内容
	public String m_sContent;
	//包含html的内容
	public String m_sHtmlContetn;
	//书影音对应的subject id
	public String m_sSubjectId;
	public String m_sSubjectName;
	//对应的图书电影音乐的类型
	public FavorityType mFavorityType;
	
	public String m_sTime;
	public String m_sUserId;
	public String m_sAvatarLink;
	public Bitmap m_bmAvatar;

	public String m_sImageLink;
	//大图链接
	public String mLImageLink;
	public Bitmap m_bmImage;
	//
	//public String m_sRecommendationId; //推荐id

	public boolean m_bHasImage;
	public int m_iType;

	//一个网址,以数字结尾
	public int m_iId;
	//推荐id,当为推荐时获取
	public String m_sRecommendId;

//	public String m_sRecommendUserId;
//	public String m_sRecommendUserName;

	//为关注时,被关注用户id,,//比如推荐某人相册时,相册主淫的id
	public String m_sOtherUserId;
	public String m_sOtherUserName;

	//相册图片链接
	public String m_sPhotoLink;

	//相册id(备用..
	public String m_sAlbumId;
	public ItemType m_itemType;
	
	//记入unknow的内容和链接！
	public String mUnKnowContent;
	public String mUnKnowContentLink;

	private static HashMap<String, ItemType> m_hmItemType;


	public MiniBlogItemData(){

	}

	public static ItemType getItemType(String str){
		return getInstance().get(str);
	}

	private static HashMap<String, ItemType> getInstance(){
		if(null == m_hmItemType){
			m_hmItemType = new HashMap<String, ItemType>();
			m_hmItemType.put("saying", ItemType.SAYING);
			m_hmItemType.put("book", ItemType.BOOK);
			m_hmItemType.put("magazine", ItemType.MAGAZINE );
			m_hmItemType.put("movie", ItemType.MOVIE);
			m_hmItemType.put("tv", ItemType.TV);
			m_hmItemType.put("music", ItemType.MUSIC);
			m_hmItemType.put("place", ItemType.PLACE);
			m_hmItemType.put("group", ItemType.GROUP);
			m_hmItemType.put("event", ItemType.EVENT);

			m_hmItemType.put("site", ItemType.SITE);
			m_hmItemType.put("recommendation", ItemType.RECOMMENDATION);
			m_hmItemType.put("note", ItemType.NOTE);
			m_hmItemType.put("blog", ItemType.BLOG);
			m_hmItemType.put("photo", ItemType.PHOTO);
			m_hmItemType.put("contact", ItemType.CONTACT);
			m_hmItemType.put("plaza", ItemType.PLAZA);
			m_hmItemType.put("signature", ItemType.SIGNATURE);
            m_hmItemType.put("unknow", ItemType.UNKONW);

		}
		return m_hmItemType;
	}
}